Finds the column and returns its object or index in columns array.

<div class="definition">
    getColumn([field], [returnIndex])
</div>

<div class="arguments">
    <table>
    <tr>
        <td>field</td>
        <td><b>string</b>, <i>optional</i> field name of the column</td>
    </tr>
    <tr>
        <td>returnIndex</td>
        <td><b>boolean</b>, <i>optional</i> indicates if return a column or its index in columns array</td>
    </tr>
    </table>
</div>
Returns object, integer or null.

<h4>Description</h4>

The column is identified by the <span class="argument">.field</span> property, which is a required property for each column object. The
method loops through the <a class="property" href="w2grid.columns">.columns</a> array to find the column object.
<div style="height: 10px"></div>

If called w/o parameters, it will return array of column names.
<div style="height: 10px"></div>

If you have grid defined in the following way:
<textarea class="javascript">
let grid = new w2grid({
    name    : 'grid',
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'lname', text: 'Last Name', size: '30%' },
        { field: 'fname', text: 'First Name', size: '30%' },
        { field: 'email', text: 'Email', size: '40%' },
        { field: 'sdate', text: 'Start Date', size: '120px' },
        { field: 'sdate', text: 'End Date', size: '120px' }
    ],
    records: [
        { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' },
        { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' },
        { recid: 3, fname: 'Jin', lname: 'Franson', email: '--', sdate: '4/23/2012' },
        { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '5/3/2012' },
        { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
        { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'vitali@gmail.com', sdate: '2/5/2012' }
    ]
});
</textarea>

You can get the column:
<textarea class="javascript">
console.log( grid.getColumn('recid') );
</textarea>
